function XSLTLocalCache (opt) {			
	var xmlDoc = null;
	var xslDoc = null;
	var key = false;
	this.onUnlock = (opt && opt.onUnlock)?(opt.onUnlock):(function(state){});
	
	this.setXmlDoc = function (xml) {
		this.xmlDoc = xml;
	}
	this.setXslDoc = function (xml) {
		this.xslDoc = xml;
	}
	this.getXmlDoc = function () {
		return this.xmlDoc;
	}
	this.getXslDoc = function () {
		return this.xslDoc;
	}
	
	this.lock = function () {
		this.key = true;
	}
	this.unlock = function () {
		this.key = false;
		this.onUnlock({
			xmlDoc: this.xmlDoc,
			xslDoc: this.xslDoc
		});
	}
	
	this.checkXmlDoc = function () {
		if (this.xmlDoc) {
			return true;
		}
		return false;
	}
	this.checkXslDoc = function () {
		if (this.xslDoc) {
			return true;
		}
		return false;
	}
	
	this.reset = function () {
		this.xmlDoc = null;
		this.xslDoc = null;
	}
	
};